﻿#include <iostream>
#include <string>

#include <zmq.hpp>

#include "../../inc/helper.hpp"

int main()
{
	zmq::context_t ctx;
	zmq::socket_t requester = zmq::socket_t(ctx, ZMQ_REQ);
	requester.connect("tcp://localhost:5559");

	while (true) {
		std::string request = { "hello" };
		requester.send(request.data(), request.size());
		info("Send request: {}", request);

		zmq::message_t respond;
		requester.recv(&respond);
		std::string respond_str((char*)respond.data(), respond.size());
		info("Receve respond: {}", respond_str);
	}
}
